<form method="post" action="${rc.getContextPath()}/manage/productionOrder/saveProductionOrder" class="pageForm required-validate">
<div class="pageContent">
    <div class="pageFormContent customFildset" layoutH="56">
        <fieldset>
            <legend>工艺信息</legend>
            <dl>
                <dt><@label key='productionOrderNum.C,colon'>生产订单编号：</@label></dt>
                <dd><input type="text" name="productionOrderNum" maxlength="20" value="${productionOrder.productionOrderNum!''}" class="required" readonly="readonly"></dd>
            </dl>
            <dl>
                <dt><@label key='plannedQuantity.C,colon'>计划数量</@label></dt>
                <dd><input type="text" name="plannedQuantity" class="required number" readonly="readonly" value="${productionOrder.plannedQuantity!''}"/></dd>
            </dl>
            <dl>
                <dt><@label key='requirementDate.C,colon'>需求日期：</@label></dt>
                <dd><input type="text" name="requirementDate" class="required date" readonly="readonly" value="${(productionOrder.requirementDate?string('yyyy-MM-dd'))?if_exists}"/></dd>
            </dl>
        </fieldset>
    </div>
    <table class="table" width="100%" layoutH="5">
        <thead>
            <tr>
                <th width="40"><@label key="serialNumber.C">序号</@label></th>
                <th width="80"><@label key='orderStatusECode.C'>订单状态</@label></th>
                <th width="100"><@label key='workCenter_type.C'>工作中心类型</@label></th>
                <th width="100"><@label key='workCenter.C,code.C'>工作中心编号</@label></th>
                <th width="100"><@label key='workCenter.C,description.C'>工作中心描述</@label></th>
                <th width="80"><@label key='plannedQuantity.C'>计划数量</@label></th>
                <th width="80"><@label key='completedQuantity.C'>完工数量</@label></th>
                <th width="80"><@label key='scrappedQuantity.C'>报废数量</@label></th>
                <th width="80"><@label key='repairQuantity.C'>返修数量</@label></th>
                <th width="100"><@label key='actualstartDateTime.C'>实际开始时间</@label></th>
                <th width="100"><@label key='actualendDateTime.C'>实际结束时间</@label></th>
            </tr>
        </thead>
        <tbody>
        <#if productionOrder??><#if (productionOrder.details?size>0)>
            <#list productionOrder.details as detail>
            <tr target="process_id" rel="${process.id!''}">
                <td>${detail_index + 1}</td>
                <td>
                <#if orderStatusECode??>
                    <#list orderStatusECode as ecode>
                        <#if detail.statusECode == ecode.eCode>${ecode.eCodeText!''}<#break></#if>
                    </#list>
                </#if>
                </td>
                <td>${detail.workCenterTypeText!''}</td>
                <td>${detail.workCenterCode!''}</td>
                <td>${detail.workCenterText!''}</td>
                <td>${detail.plannedQuantity!''}</td>
                <td>${detail.completedQuantity!''}</td>
                <td>${detail.scrappedQuantity!''}</td>
                <td>${detail.repairQuantity!''}</td>
                <td>${(production.actualstartDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${(production.actualendDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
            </tr>
        </#list>
        <#else>
            <#if (productionOrder.workCenters?size>0)>
                    <#list productionOrder.workCenters as wc>
                        <tr target="process_id" rel="${process.id!''}">
                            <td>${wc_index + 1}</td>
                            <td>
                            <#if orderStatusECode??>
                                <#list orderStatusECode as ecode>
                                    <#if detail.statusECode == ecode.eCode>${ecode.eCodeText!''}<#break></#if>
                                </#list>
                            </#if>
                            </td>
                            <td>${detail.workCenterTypeText!''}</td>
                            <td>${detail.workCenterCode!''}</td>
                            <td>${detail.workCenterText!''}</td>
                            <td>${detail.plannedQuantity!''}</td>
                            <td>${detail.completedQuantity!''}</td>
                            <td>${detail.scrappedQuantity!''}</td>
                            <td>${detail.repairQuantity!''}</td>
                            <td>${(production.actualstartDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                            <td>${(production.actualendDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                        </tr>
                    </#list>
            </#if>
        </#if>
        <#else>
        <tr target="process_id">
                <td colspan="11" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        </tbody>
    </table>
    <div class="formBar">
        <ul>
            <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
            <li><div class="buttonActive"><div class="buttonContent"><button type="button">下达</button></div></div></li>
            <li>
                <div class="buttonActiveGrey"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
            </li>
        </ul>
    </div>
</form>
</div>